/**
 @file ctc_asw_parser.h

 @author  Copyright (C) 2011 Centec Networks Inc.  All rights reserved.

 @date 2021-12-15

 @version v2.0

 Parser module is used to set stpid and ctpid information. 
*/

#ifndef CTC_ASW_PARSER_H_
#define CTC_ASW_PARSER_H_
#ifdef __cplusplus
extern "C" {
#endif

#include "ctc_parser.h"

/**********************************************************************************
                      Define API function interfaces
***********************************************************************************/
/**
@addtogroup parser PARSER
@{
*/

/**
 @brief Set tpid value with specified type

 @param[in] lchip    local chip id

 @param[in] type tpid_type CTC_PARSER_L2_TPID_XXX

 @param[in] tpid tpid value

 @remark[TMA]  Set tpid value with specified type:
\p
                Use CTC_PARSER_L2_TPID_CVLAN_TPID  to set cvlan tpid
\p
                Use CTC_PARSER_L2_TPID_SVLAN_TPID_0 to set svlan tpid

 @return CTC_E_XXX

*/
extern int32
ctc_asw_parser_set_tpid(uint8 lchip, ctc_parser_l2_tpid_t type, uint16 tpid);

/**
 @brief Get tpid with specified type

 @param[in] lchip    local chip id

 @param[in] type tpid_type CTC_PARSER_L2_TPID_XXX

 @param[out] tpid tpid value

 @remark[TMA]  Get tpid value with specified type:
\p
                Use CTC_PARSER_L2_TPID_CVLAN_TPID to get cvlan tpid
\p
                Use CTC_PARSER_L2_TPID_SVLAN_TPID_0 to get svlan tpid

 @return CTC_E_XXX

*/
extern int32
ctc_asw_parser_get_tpid(uint8 lchip, ctc_parser_l2_tpid_t type, uint16* tpid);

/**@} end of @addtogroup   parser PARSER*/

#ifdef __cplusplus
}
#endif

#endif
